#region Copyright
/// <copyright>
/// Copyright (c) 2007 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Diagnostics;

namespace OshHost
{
	/// <summary>
	/// Summary description for Configuration
	/// </summary>
	public class Configuration
	{
		private static Configuration _local;

		private TraceSource _oshTraceSource = new TraceSource("OshHost.Osh");
		private TraceSource _hostTraceSource = new TraceSource("OshHost.Host");

		public Configuration()
		{
		}

		public string HomePageUrl
		{
			get { return @"osh://localhost/default.aspx"; }
		}

		public string ConsolePageUrl
		{
			get { return @"osh://localhost/console/console.html"; }
		}

		public string LogPageUrl
		{
			get { return @"osh://localhost/log/log.html"; }
		}

		public TraceSource OshTraceSource
		{
			get { return _oshTraceSource; }
		}

		public TraceSource HostTraceSource
		{
			get { return _hostTraceSource; }
		}

		public static Configuration Local
		{
			get
			{
				if(_local == null)
					_local = new Configuration();
				return _local;
			}
		}

		public static OshHostSection OshHost
		{
			get { return (OshHostSection)Global.GetSection("oshHost"); }
		}

		public static Osh.Configuration.Configuration Global
		{
			get { return global::Osh.Configuration.Configuration.Current; }
		}
	}
}